#include <iostream>
#include "sqstack.h"
using namespace std;

Status print(ElemType num)
{
	cout << num << " ";
	return OK;
}

int main()
{
	SqStack sqs;
	ElemType num;
	Status st = 0;
	cout << sqs.StackEmpty() << endl;
	for(num = 1; num <= 5; num++)
	{
		cout << "Push: " << num << endl;
		sqs.Push(num);
	}
	cout << sqs.StackEmpty() << endl;
	sqs.GetTop(num);
	cout << "The element on the top is: " << num << endl;
	cout << "Call the function \"print\" on the stack: ";
	sqs.StackTraverse(print);
	cout << endl;
	do{
		st = sqs.Pop(num);
		if(st == 1)
			cout << "Pop: " << num << endl;
	}while(st == 1);
	return 0;
}